<template>
	<view class="work-container">

		<!-- 宫格组件 -->
		<uni-section title="客户管理" type="line"></uni-section>
		<view class="grid-body">
			<uni-grid :column="5" :showBorder="false">
				<uni-grid-item>
					<view class="grid-item-box">

						<uni-icons @click="showCustom(1)" type="staff-filled" size="30"></uni-icons>
						<text class="text">公海客户</text>
					</view>
				</uni-grid-item>
				<uni-grid-item>
					<view class="grid-item-box">

						<uni-icons @click="showCustom(2)" type="icon-kehu" custom-prefix="iconfont"
							size="30"></uni-icons>
						<text class="text">目标客户</text>
					</view>
				</uni-grid-item>
				<uni-grid-item>
					<view class="grid-item-box">

						<uni-icons @click="showCustom(3)" type="icon-kehu1" custom-prefix="iconfont"
							size="30"></uni-icons>

						<text class="text">我的客户</text>
					</view>
				</uni-grid-item>
				<uni-grid-item>
					<view class="grid-item-box">

						<uni-icons @click="showCustom(4)" type="icon-kehu2" custom-prefix="iconfont"
							size="30"></uni-icons>

						<text class="text">转入客户</text>
					</view>
				</uni-grid-item>

			</uni-grid>
		</view>


		<uni-section title="合同管理" type="line"></uni-section>
		<view class="grid-body">
			<uni-grid :column="4" :showBorder="false">
				<uni-grid-item>
					<view class="grid-item-box">
						<uni-icons @click="showContract(1)" custom-prefix="iconfont"
							type="icon-querenhetongquerenhetongqueding" size="30"></uni-icons>
						<text class="text">全部合同</text>
					</view>
				</uni-grid-item>
				<uni-grid-item>
					<view class="grid-item-box">
						<uni-icons @click="showContract(2)" custom-prefix="iconfont" type="icon-wodehetong"
							size="30"></uni-icons>
						<text class="text">我的合同</text>
					</view>
				</uni-grid-item>
				<uni-grid-item>
					<view class="grid-item-box">
						<uni-icons @click="showContract(3)" custom-prefix="iconfont" type="icon-kehulaiyuan"
							size="30"></uni-icons>
						<text class="text">待回款合同</text>
					</view>
				</uni-grid-item>


			</uni-grid>
		</view>
		<uni-section title="数据中心" type="line"> </uni-section>
		<view class="grid-body">
			<uni-grid :column="5" :showBorder="false">
				<uni-grid-item>
					<view class="grid-item-box">
						<uni-icons @click="xiaoshouqushi" custom-prefix="iconfont" type="icon-xiaoshouguanli"
							size="30"></uni-icons>
						<text class="text">销售趋势</text>
					</view>
				</uni-grid-item>
				<uni-grid-item>
					<view class="grid-item-box">
						<uni-icons @click="xiaoshoupaihang" custom-prefix="iconfont" type="icon-xiaoshoupaihang"
							size="30"></uni-icons>
						<text class="text">销售排行</text>
					</view>
				</uni-grid-item>
				<uni-grid-item>
					<view class="grid-item-box">
						<uni-icons @click="kehulaiyuan" custom-prefix="iconfont" type="icon-kehulaiyuan"
							size="30"></uni-icons>
						<text class="text">客户来源</text>
					</view>
				</uni-grid-item>
				<uni-grid-item>
					<view class="grid-item-box">
						<uni-icons @click="kehuyixiang" custom-prefix="iconfont" type="icon-kehuyixiangfenxi"
							size="30"></uni-icons>
						<text class="text">跟进状态</text>
					</view>
				</uni-grid-item>
				<uni-grid-item>
					<view class="grid-item-box">
						<uni-icons custom-prefix="iconfont" type="icon-jierudan" size="30"></uni-icons>
						<text class="text">部门业绩</text>
					</view>
				</uni-grid-item>
			</uni-grid>
		</view>



		<uni-section title="代办管理" type="line"></uni-section>
		<view class="grid-body">
			<uni-grid :column="4" :showBorder="false" @change="changeGrid">
				<uni-grid-item>
					<view class="grid-item-box">
						<uni-icons custom-prefix="iconfont" type="icon-use53" size="20"></uni-icons>
						<text class="text">代办中心</text>
					</view>
				</uni-grid-item>



			</uni-grid>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userId: 0
			}
		},
		onLoad() {
			this.userId = uni.getStorageSync('id');
			console.log('userId:' + this.userId)
		},
		methods: {
			clickBannerItem(item) {
				console.info(item)
			},
			changeSwiper(e) {
				this.current = e.detail.current
			},
			changeGrid(e) {
				this.$modal.showToast('模块建设中~')
			},
			showCustom(category) {
				// alert(userId+' '+category)
				uni.reLaunch({
					url: '/pages/work/kehu/showCustom?category=' + category
				})
			},
			showContract(categorys) {
				// alert(userId+' '+category)
				uni.reLaunch({
					url: '/pages/work/hetong/showContract?categorys=' + categorys
				})
			},
			kehulaiyuan() {
				this.$tab.navigateTo('/pages/work/shuju/kehulaiyuan')
			},
			kehuyixiang() {
				this.$tab.navigateTo('/pages/work/shuju/kehuyixiang')
			},
			xiaoshoupaihang() {
				this.$tab.navigateTo('/pages/work/shuju/xiaoshoupaihang')
			},
			xiaoshouqushi() {
				this.$tab.navigateTo('/pages/work/shuju/xiaoshouqushi')
			},
		}
	}
</script>





<style lang="scss">
	// @import "@/static/font/iconfont.css"
	/* #ifndef APP-NVUE */
	page {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		background-color: #fff;
		min-height: 100%;
		height: auto;
	}

	view {
		font-size: 14px;
		line-height: inherit;
	}

	/* #endif */

	.text {
		text-align: center;
		font-size: 26rpx;
		margin-top: 10rpx;
	}

	.grid-item-box {
		flex: 1;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 15px 0;
	}

	.uni-margin-wrap {
		width: 690rpx;
		width: 100%;
		;
	}

	.swiper {
		height: 300rpx;
	}

	.swiper-box {
		height: 150px;
	}

	.swiper-item {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		justify-content: center;
		align-items: center;
		color: #fff;
		height: 300rpx;
		line-height: 300rpx;
	}

	@media screen and (min-width: 500px) {
		.uni-swiper-dot-box {
			width: 400px;
			/* #ifndef APP-NVUE */
			margin: 0 auto;
			/* #endif */
			margin-top: 8px;
		}

		.image {
			width: 100%;
		}

		@font-face {
			font-family: "iconfont";
			src: url('@/static/font/iconfont.ttf') format('truetype');
		}

		.iconfont {
			font-family: "iconfont" !important;
			font-size: 16px;
			display: inline-block;
			font-style: normal;
			-webkit-font-smoothing: antialiased;
			-moz-osx-font-smoothing: grayscale;
		}

		.icon-user:before {
			content: "\e7ae";
		}

		.icon-password:before {
			content: "\e8b2";
		}

		.icon-code:before {
			content: "\e699";
		}

		.icon-setting:before {
			content: "\e6cc";
		}

		.icon-share:before {
			content: "\e739";
		}

		.icon-edit:before {
			content: "\e60c";
		}

		.icon-version:before {
			content: "\e63f";
		}

		.icon-service:before {
			content: "\e6ff";
		}

		.icon-friendfill:before {
			content: "\e726";
		}

		.icon-community:before {
			content: "\e741";
		}

		.icon-people:before {
			content: "\e736";
		}

		.icon-dianzan:before {
			content: "\ec7f";
		}

		.icon-right:before {
			content: "\e7eb";
		}

		.icon-logout:before {
			content: "\e61d";
		}

		.icon-help:before {
			content: "\e616";
		}

		.icon-github:before {
			content: "\e628";
		}

		.icon-aixin:before {
			content: "\e601";
		}

		.icon-clean:before {
			content: "\e607";
		}

		.icon-refresh:before {
			content: "\e604";
		}

		.icon-hetong:before {
			content: "\e632";
		}

		.icon-xiaoshouqushi:before {
			content: "\e636";
		}

		.icon-jierudan:before {
			content: "\e60a";
		}

		.icon-xiaoshoupaihang:before {
			content: "\e635";
		}

		.icon-use53:before {
			content: "\e623";
		}

		.icon-xiaoshouguanli:before {
			content: "\e61a";
		}

		.icon-kehuyixiangfenxi:before {
			content: "\e76c";
		}

		.icon-wodehetong:before {
			content: "\e6a3";
		}

		.icon-kehulaiyuan:before {
			content: "\e65c";
		}


		.icon-kehulaiyuan:before {
			content: "\e65c";
		}

		.icon-querenhetongquerenhetongqueding:before {
			content: "\e690";
		}

		.icon-kehu:before {
			content: "\e804";
		}

		.icon-kehu1:before {
			content: "\e605";
		}

		.icon-kehu2:before {
			content: "\e67e";
		}
	}
</style>